/*

Trenton Mize	
Proposal title: Precarious Sexuality and Categorization of Sexual Orientation

HYPOTHESES

Stated-Hyp1: A man with an exclusively heterosexual sexual history who has a single same-sex encounter is less likely to still be viewed as heterosexual than a woman with an exclusively heterosexual sexual history who has a single same-sex encounter.

	Test-Hyp1: Participants in the man with heterosexual sexual history - recent same-sex sexual encounter condiiton will be less likely to rate the target as heterosexual than participants in the woman with heterosexual sexual history - recent same-sex sexual encounter condiiton

Stated-Hyp2: A man with an exclusively same-sex sexual history who has single different-sex encounter is more likely to still be viewed as gay than a woman with an exclusively same-sex sexual history who has a single different-sex encounter.

	Test-Hyp2: Participants in the man with gay sexual history - recent different-sex sexual encounter condiiton will be more likely to rate the target as homosexual than participants in the woman with lesbian sexual history - recent different-sex sexual encounter condiiton
	
********************************************************************************

NOTES: 
	
The proposal mentions a dichotomous measure of the dependent variables. Here, we 
focused on the continuous measure because it should increase power.
	
*/

clear all
use "MizeB49.dta", clear

********************************************************************************

* RECODING

* experiment condition
	tab dov_tess192, mis
	recode dov_tess192 (1=1) (3=0) (nonmiss=.), gen(treat_heterosexualHistory)
	lab def treat_heterosexualHistoryLabel 0 "0 Woman" 1 "1 Man"
	lab val treat_heterosexualHistory treat_heterosexualHistoryLabel 
	tab dov_tess192 treat_heterosexualHistory, mis

	tab dov_tess192, mis
	recode dov_tess192 (2=1) (4=0) (nonmiss=.), gen(treat_samesexHistory)
	lab def treat_samesexHistoryLabel 0 "0 Woman" 1 "1 Man"
	lab val treat_samesexHistory treat_samesexHistoryLabel 
	tab dov_tess192 treat_samesexHistory, mis
	
* DV
	tab q1_a, mis
	tab q1_a, mis nolab
	tab q1_b, mis
	tab q1_c, mis
	tab q2_a, mis
	tab q2_b, mis
	tab q2_c, mis

	recode q1_a (-1 = .)	
	recode q1_b (-1 = .)	
	recode q1_c (-1 = .)	
	recode q2_a (-1 = .)	
	recode q2_b (-1 = .)	
	recode q2_c (-1 = .)	

	cap drop DV_hetero
	gen DV_hetero = .
	replace DV_hetero = q1_a/(q1_a+q1_b+q1_c) if dov_tess192 == 1 | dov_tess192 == 2
	replace DV_hetero = q2_a/(q2_a+q2_b+q2_c) if dov_tess192 == 3 | dov_tess192 == 4
	tab DV_hetero, mis
	
	cap drop DV_same
	gen DV_same = .
	replace DV_same = q1_b/(q1_a+q1_b+q1_c) if dov_tess192 == 1 | dov_tess192 == 2
	replace DV_same = q2_b/(q2_a+q2_b+q2_c) if dov_tess192 == 3 | dov_tess192 == 4
	tab DV_same, mis
		
********************************************************************************

* ANALYSIS

* Test-Hyp1: Participants in the man with heterosexual sexual history - recent same-sex sexual encounter condiiton will be less likely to rate the target as heterosexual than participants in the woman with heterosexual sexual history - recent same-sex sexual encounter condiiton

	reg DV_hetero i.treat_heterosexualHistory if treat_heterosexualHistory != .
		// support for H1 (p = .000)
	tess 1.treat_heterosexualHistory -, init(MizeB49)
	
* Test-Hyp2: Participants in the man with gay sexual history - recent different-sex sexual encounter condiiton will be more likely to rate the target as homosexual than participants in the woman with lesbian sexual history - recent different-sex sexual encounter condiiton

	reg DV_same i.treat_samesexHistory if treat_samesexHistory != .
		// support for H2 (p = .005)
	tess 1.treat_samesexHistory +
